package com.example.campuslink.commen.db.userInfo

import androidx.room.Dao
import androidx.room.Insert
import androidx.room.Query
import androidx.room.Update

@Dao
interface UserInfoDao {
    @Query("SELECT MAX(id) FROM user_info_table")
    fun getMaxId(): Int?
    @Insert
    fun insertUserInfo(userInfoTable: UserInfoTable)
    @Query("SELECT * FROM user_info_table WHERE userNumber = :userNumber")
    fun getUserInfoByUserNumber(userNumber: String): UserInfoTable?
    @Query("SELECT * FROM user_info_table WHERE userName = :userName")
    fun getUserInfoByUserName(userName: String): UserInfoTable?
    @Update
    fun updateUserInfo(userInfoTable: UserInfoTable)
}